package com.kuaixueit.crm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PageController {
	
	/**
	 * 通用的页面跳转
	 * @return
	 */
	//http://localhost:8080/aaa.do
	//http://localhost:8080/ccc.do
	//http://localhost:8080/aaa/cc.do
	//@RequestMapping("{pagePath}/cc")
	//规范 aa_cc_bb.do==>WEB-INF下面的jsp/aa/cc/bb.jsp
	//html/dept/listDept
	@RequestMapping("{pagePath}")
	public String toPage(@PathVariable("pagePath")String path){
		String replace = path.replace("_", "/");
		return replace;
	}

}
